package com.windersgroup.querynumber.entity;

import org.springframework.util.StringUtils;

public class MachineNum {
	private static int num = 0;
	private static String dateStr = ""; //yyyyMMdd
	private MachineNum(){}
	public static synchronized int getInstance(String datestr) {
		if (StringUtils.isEmpty(dateStr) || !dateStr.equals(datestr)) {
			num = 0;
			dateStr = datestr;
		}
		num = num + 1;
		
		return num;
	}
	   
}
